package proyecto.modelo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Set;


/**
 * The persistent class for the sala database table.
 * 
 */
@Entity
@Table(name="sala")
public class Sala implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private SalaPK id;

	private int capacidad;

	private String numero;

	private String tipo;

	//bi-directional many-to-one association to DetCartelera
	@OneToMany(mappedBy="sala")
	private Set<DetCartelera> detCarteleras;

	//bi-directional many-to-one association to Cine
    @ManyToOne
	@JoinColumn(name="co_cine")
	private Cine cine;

    public Sala() {
    }

	public SalaPK getId() {
		return this.id;
	}

	public void setId(SalaPK id) {
		this.id = id;
	}
	
	public int getCapacidad() {
		return this.capacidad;
	}

	public void setCapacidad(int capacidad) {
		this.capacidad = capacidad;
	}

	public String getNumero() {
		return this.numero;
	}

	public void setNumero(String numero) {
		this.numero = numero;
	}

	public String getTipo() {
		return this.tipo;
	}

	public void setTipo(String tipo) {
		this.tipo = tipo;
	}

	public Set<DetCartelera> getDetCarteleras() {
		return this.detCarteleras;
	}

	public void setDetCarteleras(Set<DetCartelera> detCarteleras) {
		this.detCarteleras = detCarteleras;
	}
	
	public Cine getCine() {
		return this.cine;
	}

	public void setCine(Cine cine) {
		this.cine = cine;
	}
	
}